package tech.aistar.day05.exercise;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2022/7/22 2:24 下午
 */
public class Rect extends Shape{
    private int len;

    private int width;

    public Rect() {
    }

    public Rect(int len, int width) {
        this.len = len;
        this.width = width;
    }

    @Override
    public double area() {
        return len*width;
    }

    @Override
    public double girth() {
        return (len+width)*2;
    }
}
